package com.youkeyi.ddy.cloud.common.api.basic.pub.tag;

import com.youkeyi.ddy.cloud.common.api.basic.pub.tag.dto.PublicTagListCloudDto;
import com.youkeyi.ddy.cloud.common.api.basic.pub.tag.dto.PublicTagQueryBindListCloudDto;
import com.youkeyi.ddy.cloud.common.api.basic.pub.tag.dto.PublicTagTreeItemCloudDto;
import com.youkeyi.ddy.cloud.common.api.basic.pub.tag.param.*;
import com.youkeyi.ddy.cloud.common.response.ResponseContent;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.ArrayList;
import java.util.List;

/**
 * PublicTagCloudServiceFallback
 *
 * @Author liuxiawang
 * @Date 2024/2/20 4:28 PM
 * @Location shenzhen.china
 */
@Slf4j
@Component
@RequestMapping("/public/tag/fallback")
public class PublicTagCloudServiceFallback implements PublicTagCloudService {

    @Override
    public PublicTagListCloudDto query(PublicTagQueryCloudParam param) {
        return new PublicTagListCloudDto(Boolean.FALSE, "服务不可用");
    }

    @Override
    public List<PublicTagTreeItemCloudDto> queryTree(PublicTagQueryTreeCloudParam param) {
        log.error("服务不可用");
        return new ArrayList<>();
    }

    @Override
    public ResponseContent create(PublicTagCreateCloudParam param) {
        return new ResponseContent(Boolean.FALSE, "服务不可用");
    }

    @Override
    public ResponseContent update(PublicTagUpdateCloudParam param) {
        return new ResponseContent(Boolean.FALSE, "服务不可用");
    }

    @Override
    public ResponseContent delete(PublicTagDeleteCloudParam param) {
        return new ResponseContent(Boolean.FALSE, "服务不可用");
    }


    @Override
    public ResponseContent bind(PublicTagBindCloudParam param) {
        return new ResponseContent(Boolean.FALSE, "服务不可用");
    }

    @Override
    public ResponseContent unbind(PublicTagUnbindCloudParam param) {
        return new ResponseContent(Boolean.FALSE, "服务不可用");
    }

    @Override
    public PublicTagQueryBindListCloudDto queryBind(PublicTagQueryBindCloudParam param) {
        return new PublicTagQueryBindListCloudDto(Boolean.FALSE, "服务不可用");
    }
}
